﻿Public Class Form4

    Private Sub SweetsBindingNavigatorSaveItem_Click(sender As System.Object, e As System.EventArgs)
        Me.Validate()
        Me.SweetsBindingSource.EndEdit()
        Me.TableAdapterManager.UpdateAll(Me.RecipiesDataSet)

    End Sub

    Private Sub Form4_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'RecipiesDataSet.Sweets' table. You can move, or remove it, as needed.
        Me.SweetsTableAdapter.Fill(Me.RecipiesDataSet.Sweets)

    End Sub

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        SweetsDataGridView.DataSource = Me.RecipiesDataSet.Sweets.Select("Food ID LIKE '" & TextBox2.Text & "'")
    End Sub
End Class